﻿<%@ Page Language="C#" MasterPageFile="~/Employeer/SearchMaster.master" AutoEventWireup="true" CodeFile="SearchCVDetails.aspx.cs" Inherits="Employeer_SearchCVDetails" Title="npljobs.com || CV Details" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        .margin {
            margin-left: 3px;
        }

        .ButtonStyle {
            border: thin solid #C6C3DE;
            background-color: #ECEBFA;
            margin-left: 5px;
            width: auto;
            height: 25px;
            padding-left: 5px;
            padding-right: 5px;
            font-size: 13px;
            font-weight: bold;
            padding-top: 3px;
            padding-bottom: 3px;
            text-align: center;
            color: #636363;
            border-radius: 5px;
            -webkit-border-radius: 5px;
            -moz-border-radius: 5px;
        }

            .ButtonStyle:hover {
                border-color: #726E96;
                color: #636363;
                cursor: pointer;
            }

        .DynamicDialogStyle {
            background-color: #F7FAFE;
            font-size: small;
        }

        .txtSpanOverrid {
            color: #333 !important;
            font-weight: 400;
        }

        .search-cv-body {
            min-width: 1000px;
        }
    </style>
    <script type="text/javascript">

        function sendMail() {

            var toEmail = $("#<%= this.toEmailAddress.ClientID %>").val();
            var subject = $("#<%= this.txtSubject.ClientID %>").val();
            var empMail = $("#ctl00_MainContent_empEmailList option:selected").text();
            var emailMessage = $("#<%= this.TextBox_EmailMessage.ClientID %>").val();



            if (toEmail == "" || subject == "" || emailMessage == "") {
                $("#ctl00_MainContent_lblMsg").text("Subject/email/body is missing");
                $("#lblReqEmail").text("*");
                $("#lblReqSubject").text("*");
                $("#lblReqBody").text("*");
            }
            else {
                $("#<%= this.lblMsg.ClientID %>").text("");
                $("#lblReqEmail").text("");
                $("#lblReqSubject").text("");
                $("#lblReqBody").text("");

                $("#imgLoader").css("display", "inline")
                $("#imgLoader").attr("src", "../img/loader.gif");

                $.ajax({
                    type: "POST",
                    contentType: "application/json; charset=utf-8",
                    url: "SearchCVDetails.aspx/SendMail",
                    data: JSON.stringify({ 'toEmail': toEmail, 'subject': subject, 'empMail': empMail, 'emailMessage': emailMessage }),
                    datatype: "json",
                    success: function (data) {
                        var msg = data.d;
                        divText = "<div id='mailError'  ><h1>&nbsp;" + msg.Message + "</h1></div>"
                        $(divText).css({
                            position: "absolute",
                            width: "100%",
                            height: "100%",
                            top: 0,
                            left: 0,
                            background: "#ccc",
                            color: "green",
                            textalign: "center"
                        }).appendTo($("#mail"));

                        $("#imgLoader").attr("src", "../img/alt.png");
                        $("#imgLoader").css("display", "none;")
                    },
                    error: function (xhr, tStatus, err) {
                        $("#imgLoader").attr("src", "../img/alt.png");
                        $("#imgLoader").css("display", "none;")

                        $("<div id='mailError' ><h1>&nbsp;There is an error processing your mail.</h1></div>").css({
                            position: "absolute",
                            width: "100%",
                            height: "100%",
                            top: 0,
                            left: 0,
                            background: "#ccc",
                            color: "red",
                            textalign: "center"
                        }).appendTo($("#mail").css("position", "relative")
                            .css("color", "red")
                            .css("text-align", "center"));
                    },
                    complete: function (xhr, status) {

                    }
                });
            }
        }


        jQuery(document).ready(function () {
            $('#<%= this.LocalDialogMail.ClientID %>').dialog({
                dialogClass: 'DynamicDialogStyle',
                autoOpen: false,
                resizable: false,
                draggable: false,
                modal: true,
                closeOnEscape: true,

                open: function (type, data) {
                    $("#mailError").remove();
                    $(this).parent().appendTo("form");
                },
                width: 600,
                height: 500,
                title: "Email to JobSeeker"
            });




            $("#btnDialogEmail").click(function () {
                //debugger;

                $("#imgLoader").attr("src", "../img/alt.png");
                $("#imgLoader").css("display", "none;")

                $("#<%= this.lblMsg.ClientID %>").text("");
                $("#lblReqEmail").text("");
                $("#lblReqSubject").text("");
                $("#lblReqBody").text("");


                $("#<%= this.txtSubject.ClientID %>").val("");
                $("#<%= this.TextBox_EmailMessage.ClientID %>").val("");

                $("#<%= this.LocalDialogMail.ClientID %>").dialog("open");
            });

            $("#userSearchField").focus();
            $(".ui-dialog-titlebar-close").html("<img src='../img/close.png' style='margin-top:-5px;margin-left:-5px;'>");

        });
    </script>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">

    <div class="container cv-details-page">
        <div class="row top-margin">
            <!-- Panel Container Start Here-->
            <div class="panel panel-default" style="width: 100%;">

                <!-- Panel Header Here-->
                <div class="panel-heading orange-gradiant">
                    <h3 class="panel-title">&nbsp;&nbsp;Candidate resume details</h3>
                </div>
                <!-- Panel Header Here-->

                <!-- Panel Body Start Here-->
                <div class="panel-body">

                    <!--Cv Short Details-->
                    <div class="row search-cv">
                        <div class="row">
                            <h3>
                                <asp:Label ID="Label16" CssClass="txtSpanOverrid" Text='<%# this.jobSeekerBind.FirstName %>' runat="server" />
                                <asp:Label ID="Label17" CssClass="txtSpanOverrid" Text='<%# this.jobSeekerBind.LastName %>' runat="server" /></h3>
                            <div class="col-md-6">
                                <p>
                                    <asp:Label ID="Label18" CssClass="txtSpanOverrid" Text='<%# this.degree %>' runat="server" />
                                    |
                                    <asp:Label ID="Label19" Text='<%# this.institution %>' runat="server" />
                                    <br>
                                    <asp:Label ID="Label20" CssClass="txtSpanOverrid" Text='<%# this.jobtitle %>' runat="server" /><br>
                                    <asp:Label ID="Label21" CssClass="txtSpanOverrid" Text='<%# this.companyName %>' runat="server" />
                                </p>
                            </div>
                            <div class="col-md-6 pull-right">
                                <div class="col-md-4">
                                    <span>Last Updated</span>
                                    <br>
                                    <span>Experiences</span><br>
                                    <span>Desired Salary</span>
                                </div>
                                <div class="col-md-8">
                                    :
                                    <asp:Label ID="Label22" CssClass="txtSpanOverrid" Text='<%# this.ModifiedON %>' runat="server" />
                                    <br>
                                    :
                                    <asp:Label ID="Label24" CssClass="txtSpanOverrid" Text='<%# this.experience %>' runat="server" /><br>
                                    :
                                    <asp:Label ID="Label32" CssClass="txtSpanOverrid" Text='<%#  !string.IsNullOrEmpty(this.jobSeekerBind.ExpectedSalaryRange) ? this.jobSeekerBind.ExpectedSalaryRange :"N/A" %>' runat="server" />
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">&nbsp;</div>
                        <div class="row skill-in-cv">
                            <div class="col-md-4">
                                <span>Address</span>
                                <br>
                                <span>Home</span><br>
                                <span>Mobile</span><br>
                                <span>Email</span>
                            </div>
                            <div class="col-md-8">
                                :
                                <asp:Label ID="Label23" CssClass="txtSpanOverrid" runat="server" Text='<%#   !string.IsNullOrEmpty(this.jobSeekerBind.PostalAddress) ? this.jobSeekerBind.PostalAddress :"N/A" %>' /><br>
                                :
                                <asp:Label ID="Label25" CssClass="txtSpanOverrid" runat="server" Text='<%# !string.IsNullOrEmpty(this.jobSeekerBind.HomePhone) ? this.jobSeekerBind.HomePhone :"N/A" %>' /><br>
                                :
                                <asp:Label ID="Label26" CssClass="txtSpanOverrid" runat="server" Text='<%# !string.IsNullOrEmpty(this.jobSeekerBind.MobilePhone) ? this.jobSeekerBind.MobilePhone :"N/A" %>' /><br>
                                :
                                <asp:Label ID="Label27" CssClass="txtSpanOverrid" runat="server" Text='<%#  !string.IsNullOrEmpty(this.jobSeekerBind.Email) ? this.jobSeekerBind.Email :"N/A" %>' />
                            </div>

                            <div class="row pull-right search-cs-details-btn">
                                <button id="btnDialogEmail" type="button" class="btn btn-primary orange-gradiant float-shadow" data-toggle="modal" data-target="#exampleModal" data-whatever="@mdo">Send Email</button>
                            </div>
                        </div>

                    </div>
                    <!--Cv Short Details-->

                    <!--Candidate CV Details-->
                    <div class="candidate-cv">
                        <!--Candidate CV Header-->
                        <div class="candidate-cv-header">
                            <p>
                                Resume Details  |  Last updated : 
                                <asp:Label ID="Label1" Text='<%# this.ModifiedON %>' runat="server" />
                            </p>
                        </div>
                        <!--Candidate CV Header-->

                        <!--Candidate CV Body-->
                        <div class="candidate-cv-body">

                            <!--Candidate Personal Information-->
                            <div class="row">
                                <div class="candidate-photo">
                                    <asp:Image runat="server" Width="175" Height="173" ImageUrl="<%#  this.photoPath %>" />
                                    <%--<img src="<%# this.jobSeekerBind.Photo %>" width="175" height="173" runat="server"/>--%>
                                </div>

                                <div class="candidate-name">
                                    <h1>
                                        <asp:Label ID="Label2" Text='<%# this.jobSeekerBind.FirstName %>' runat="server" />
                                        <asp:Label ID="Label3" Text='<%# this.jobSeekerBind.LastName %>' runat="server" /></h1>
                                    <h2>
                                        <asp:Label ID="Label4" Text='<%# this.jobtitle %>' runat="server" /></h2>
                                    <p>
                                        <%--<asp:Label ID="Label5" Text='<%# this.jobSeekerBind.PostalAddress +  "," + this.jobSeekerBind.City + "," + this.jobSeekerBind.District + "," + this.jobSeekerBind.Country %>' runat="server" />--%>
                                        <asp:Label ID="lblAddress" runat="server"></asp:Label>
                                        <br>
                                        Gender-
                                        <asp:Label ID="Label6" Text='<%# this.gender %>' runat="server" />,
                                         Age-<asp:Label ID="Label7" Text='<%# this.age %>' runat="server" />,
                                         Status-
                                        <asp:Label ID="Label8" Text='<%# this.maritialStatus %>' runat="server" /><br>
                                        Nationality-
                                        <asp:Label ID="Label9" Text='<%# this.nationality %>' runat="server" /><br>
                                        <%-- www.yourdomain.com--%>
                                    </p>
                                </div>
                            </div>
                            <!--Candidate Personal Information-->
                            <br />

                            <!--Candidate Objective Information-->
                            <div class="row">
                                <div class="col-md-2">
                                    <p>Objective</p>
                                </div>
                                <div class="col-md-10">
                                    <p>
                                        <asp:Label ID="Label10" Text='<%# this.jobSeekerBind.AboutMe %>' runat="server" />
                                    </p>
                                </div>
                            </div>
                            <!--Candidate Objective Information-->

                            <!--Candidate Education Information-->
                            <div class="row education">
                                <p class="candidate-cv-headline">Education</p>

                                <asp:Repeater ID="RepeaterEducationalDetails" runat="server">
                                    <ItemTemplate>
                                        <div class="col-md-2">
                                            <span>
                                                <asp:Label ID="Label11" runat="server" Text='<%#Convert.ToDateTime(Eval("ToDate")).ToString("MMM") + " " + Convert.ToDateTime(Eval("ToDate")).Year.ToString()%>' />
                                                - 
                                              <asp:Label ID="Label12" runat="server" Text='<%#Convert.ToDateTime(Eval("FromDate")).ToString("MMM") + " " + Convert.ToDateTime(Eval("ToDate")).Year.ToString()%>' />
                                            </span>
                                        </div>
                                        <div class="col-md-10">
                                            <p>
                                                <strong>
                                                    <asp:Label ID="Label15" Text='<%#Eval("InstitutionName") %>' runat="server" />
                                                </strong>
                                                <br>
                                                <span>
                                                    <asp:Label ID="Label14" runat="server" Text='<%#Eval("Degree") %>' />
                                                </span>
                                            </p>
                                        </div>
                                    </ItemTemplate>
                                </asp:Repeater>

                            </div>
                            <!--Candidate Education Information-->





                            <!--Candidate Experience Information-->
                            <div class="row experience">
                                <p class="candidate-cv-headline">Experience</p>
                                <asp:Repeater ID="RepeaterProfessionalDetails" runat="server">
                                    <ItemTemplate>
                                        <div class="col-md-2">
                                            <span>
                                                <asp:Label ID="Label11" runat="server" Text='<%#Convert.ToDateTime(Eval("ToDate")).ToString("MMM") + " " + Convert.ToDateTime(Eval("ToDate")).Year.ToString()%>' />
                                                - 
                                              <asp:Label ID="Label12" runat="server" Text='<%#Convert.ToDateTime(Eval("FromDate")).ToString("MMM") + " " + Convert.ToDateTime(Eval("ToDate")).Year.ToString()%>' /></span>
                                        </div>
                                        <div class="col-md-10">
                                            <p>
                                                <strong>
                                                    <asp:Label ID="Label13" Text='<%#Eval("CompanyName") %>' runat="server" />, 
                                                    <asp:Label ID="Label28" Text='<%#Eval("Address") %>' runat="server" /></strong><br>
                                                <span>
                                                    <asp:Label ID="Label29" Text='<%#Eval("Title") %>' runat="server" /></span>
                                            </p>
                                            <p>
                                                <asp:Label ID="Label30" Text='<%#Eval("PositionDescription") %>' runat="server" />
                                            </p>
                                        </div>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </div>
                            <!--Candidate Experience Information-->


                            <!--Candidate Skill Information-->
                            <div class="row" id="divAllSkills" runat="server">
                                <div class="col-md-2">
                                    <p>Skill(s)</p>
                                </div>
                                <%--    <div class="col-md-10">
                                    <div class="col-md-4">
                                        <ul class="skill-list">
                                            <asp:Repeater ID="RepeaterSkillsDetails" runat="server">
                                                <ItemTemplate>
                                                    <li>
                                                        <asp:Label ID="Label31" runat="server" Text='<%# Container.DataItem.ToString() %>' />
                                                    </li>
                                                </ItemTemplate>
                                            </asp:Repeater>
                                        </ul>
                                    </div>


                                </div>--%>
                                <div id="divSkills" runat="server">
                                </div>
                            </div>
                            <!--Candidate Skill Information-->
                            <br />

                            <!--Candidate Qualification Information-->
                            <div class="row">
                                <div class="col-md-2">
                                    <p>Qualifications</p>
                                </div>
                                <div class="col-md-10">
                                    <div class="col-md-4">
                                        <ul class="skill-list">
                                            <asp:Repeater ID="RepeaterQualification" runat="server">
                                                <ItemTemplate>
                                                    <li>
                                                        <asp:Label ID="Label31" runat="server" Text='<%# Container.DataItem.ToString() %>' />
                                                    </li>
                                                </ItemTemplate>
                                            </asp:Repeater>
                                        </ul>
                                    </div>


                                </div>
                            </div>
                            <!--Candidate Qualification Information-->

                            <br />


                            <!--Candidate Languages Information-->
                            <div class="row">
                                <div class="col-md-2">
                                    <p>Languages</p>
                                </div>
                                <div class="col-md-10">
                                    <ul class="skill-list">
                                        <asp:Repeater ID="RepeaterLanguageDetails" runat="server">
                                            <ItemTemplate>
                                                <li>
                                                    <asp:Label ID="Label9" runat="server" Text='<%#Eval("Language") %>' />
                                                </li>
                                            </ItemTemplate>
                                        </asp:Repeater>
                                    </ul>
                                </div>
                            </div>
                            <!--Candidate Languages Information-->


                        </div>
                        <!--Candidate CV Body-->
                    </div>
                    <!--Candidate CV Details-->

                    <div id='LocalDialogMail' style="display: none; width: auto; height: 450px" runat="server">

                        <div id="mail">
                            <span style="font-style: italic; font-size: x-small; color: Gray;">Note: This is a auto generated mail from www.npljobs.com.</span>
                            <br />
                            <br />
                            From   &nbsp; &nbsp;
                            <asp:DropDownList ID="empEmailList" runat="server" />
                            <br />
                            <br />
                            To   &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                            <asp:TextBox ID="toEmailAddress" runat="server" ReadOnly="true" Width="70%" /><label id="lblReqEmail" style="color: red;"></label><br />
                            <br />
                            Subject
                                            <asp:TextBox CssClass="margin" ID="txtSubject" runat="server" Width="70%" /><label id="lblReqSubject" style="color: red;"></label><br />
                            <br />
                            <asp:Label ID="lblMessage" runat="server" AssociatedControlID="TextBox_EmailMessage" Text="Compose Message"></asp:Label>
                            <asp:TextBox ID="TextBox_EmailMessage" runat="server" Width="100%" Height="120px" TextMode="MultiLine"></asp:TextBox>
                            <label id="lblReqBody" style="color: red;"></label>
                            <br />
                            <br />
                            <button class="btn btn-primary orange-gradiant float-shadow" type="button" onclick="return sendMail();return false;">Send</button>
                            <br />
                            <br />
                            <asp:Label ID="lblMsg" runat="server" ForeColor="Red" Font-Bold="true" Text=""></asp:Label>
                            <img id="imgLoader" style="display: none;" src="../img/alt.png" />

                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
</asp:Content>
